Preserve global Z offsets and support config groups in get_ordered_datasets#15
Preserve global Z offsets and support config groups in get_ordered_datasets#15msayr wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 14538825c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| group_is_already_global = ( | ||
| previous_offset > 0 and ( | ||
| group_z_start.min() >= previous_offset or | ||
| group_z_end.max() > previous_offset |
There was a problem hiding this comment.
Stop treating long local groups as global
When a later config group uses local Z offsets starting at 0 but is longer than the previous group, group_z_end.max() > previous_offset is true, so the group is preserved instead of shifted after the prior stack. For example, two XY configs with local ranges [0, 100) and [0, 200) leave the second group at Z 0 because 200 > 100, causing it to sort before/overlap the first group and corrupting the Z alignment plan that previously concatenated such configs.
Useful? React with 👍 / 👎.
Motivation
Description
config_pathsgroups and collect datasets per group before computing offsets so groups can be treated atomically.group_offsets,group_z_start, andgroup_z_endarrays and detect whether a group already carries global Z offsets; preserve them when they overlap the current global cursor, otherwise shift the group's Z offsets byprevious_offset.previous_offsetas the maximal adjusted Z end across the group to correctly position subsequent groups.loggingabout preserved global offsets.Testing
pytestand the tests completed successfully.Codex Task